from django.shortcuts import render
from django.http import HttpResponse,HttpResponseRedirect
from django.urls import reverse
import json
from .x23uscom import *
# Create your views here.

def x23us_search(request):

    key_word = request.POST
    print(key_word)
    key_word = key_word['key_word']
    res_obj = X23usCom(key_word)
    #res_obj = X23usCom('大主宰')
    ddnovel_info = res_obj.info()
    print(ddnovel_info)
    ddnovel_json = json.dumps(ddnovel_info)
    return HttpResponse(ddnovel_json)
